﻿<phone:PhoneApplicationPage 
    x:Class="CommunityMegaphone.Views.CitiesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DataContext="{d:DesignData ../SampleData/CitiesViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Style="{StaticResource CmTitleStyle}"/>
            <TextBlock x:Name="tbSubTitle" Text="choose a well-known city" Style="{StaticResource PhoneTextTitle2Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Search" Foreground="#FFEEB92D" FontFamily="Segoe WP SemiLight" FontSize="30" Margin="15,15,5,15"/>
                    <TextBox x:Name="tbFilter" TextChanged="OnFilterTextChanged" Width="340"/>
                </StackPanel>
                <ListBox Height="560" x:Name="CitiesListBox" ItemsSource="{Binding Cities}" SelectionChanged="OnSelectedCityChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}" FontSize="26" Margin="10,5,10,5" Style="{StaticResource PhoneTextNormalStyle}"/>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </StackPanel>
        </Grid>
    </Grid>
 </phone:PhoneApplicationPage>
